/**
 * Majiang is a library that implements Mahjong game rules.
 *
 * Copyright 2009 Prudent Jérome
 *
 *     This file is part of Majiang.
 *
 *     Majiang is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     Majiang is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * You can contact me at jprudent@gmail.com
 */
package org.liprudent.majiang.engine.tile;

import java.io.Serializable;
import java.util.List;
import java.util.SortedSet;

/**
 * This interface contains all sets of tiles we have to manage during a round
 * 
 */
public interface ITileSets extends Serializable {

	/**
	 * The wall is a set of tiles where people get new tiles
	 * 
	 * @return A list of tiles
	 */
	List<ITile> getWall();

	/**
	 * The dead wall is a set of tiles where people get new tiles each time they
	 * kong
	 * 
	 * @return A list of tiles
	 */
	List<ITile> getDeadWall();

	/**
	 * the set of discarded tiles is where people discards tiles. It's empty
	 * when round starts. A player can take the last discarded tile under
	 * certain circumstances.
	 * 
	 * @return A list of tiles
	 */
	List<ITile> getDiscardedTiles();

	/**
	 * @param nbTiles
	 *            is the number of tiles to extract from wall
	 * 
	 * @return
	 */
	SortedSet<ITile> giveTilesFromWalls(int nbTiles);

	/**
	 * @return ATile from dead wall
	 */
	ITile giveTileFromDeadWall();

	/**
	 * @return the last discarded tile, null if none
	 */
	ITile lastDiscarded();

	/**
	 * remove the last discarded tile
	 */
	void removeLastDiscardedTile();
}
